package com.demo;

import java.util.Calendar;
import static java.util.Calendar.*;
public class StaticImport {

	public static void main(String[] args) {
		Calendar instance = Calendar.getInstance();
		int year = instance.get(YEAR);
		int month = instance.get(MONTH);//0--11
		int date = instance.get(DATE);
		System.out.println(year+"-"+month+"-"+date);
		instance.add(DATE, -1);
		date = instance.get(DATE);
		System.out.println(date);
	}

}
